// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 论坛积分明细来源枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-07-27
 */
public enum BarPointSourceEnum {
    SIGN_IN(1, "签到"),
    POST_COMMON(2, "发帖-普通贴"),
    POST_FINE(3, "发帖-精品贴"),
    COMMENT(4, "评论"),
    SYSTEM_GIFT(5, "系统赠送"),
    LUCK_GIFT(6, "活动获得"),
    BUTLER_POST(11, "学习中心发帖"),
    BUTLER_COMMENT(12, "学习中心评论"),
    OVERDUE(21, "过期"),
    CONSUMPTION(22, "消费");

    private int value;

    private String name;

    BarPointSourceEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        BarPointSourceEnum arrObj[] = BarPointSourceEnum.values();
        for (BarPointSourceEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }
}
